﻿using System.Collections.Generic;

namespace K3Cloud.WebApi.Core.IoC.DataEntity.PresetEntity;

/// <summary>
/// 报表查询参数模型
/// </summary>
public class ReportParamModel : BaseEntify
{
    /// <summary>
    /// 表单ID
    /// </summary>
    public string FORMID { get; set; }
    /// <summary>
    /// 过滤方案ID
    /// </summary>
    public string FSCHEMEID { get; set; }
    /// <summary>
    /// 快速查询条件
    /// </summary>
    public List<ReportQuicklyConditionModel> QuicklyCondition { get; set; }
    /// <summary>
    /// 更多查询条件
    /// </summary>
    public List<ReportMoreConditionModel> MoreCondition { get; set; }
    /// <summary>
    /// 开始行索引
    /// </summary>
    public int StartRow { get; set; }
    /// <summary>
    /// 限制行数
    /// </summary>
    public int Limit { get; set; } = 10000;
    /// <summary>
    /// 当前查询ID
    /// </summary>
    public string CurQueryId { get; set; }
    /// <summary>
    /// 字段键集合
    /// </summary>
    public string FieldKeys { get; set; }
}

/// <summary>
/// 报表快速查询条件模型
/// </summary>
public class ReportQuicklyConditionModel
{
    /// <summary>
    /// 绑定实体属性
    /// </summary>
    public string FieldName { get; set; }
    /// <summary>
    /// 字段值
    /// </summary>
    public string FieldValue { get; set; }
}

/// <summary>
/// 报表更多查询条件模型
/// </summary>
public class ReportMoreConditionModel
{
    /// <summary>
    /// 左括号
    /// </summary>
    public string Left { get; set; }

    /// <summary>
    /// 字段名
    /// </summary>
    public string FieldName { get; set; }

    /// <summary>
    /// 比较运算符
    /// </summary>
    public string Compare { get; set; }

    /// <summary>
    /// 字段值
    /// </summary>
    public string FieldValue { get; set; }

    /// <summary>
    /// 右括号
    /// </summary>
    public string Right { get; set; }

    /// <summary>
    /// 逻辑运算符
    /// </summary>
    public string Logic { get; set; }
}